﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlQuanLyMatKhauBA.ascx.cs" Inherits="WebUserControl_ControlQuanLyMatKhauBA" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
      <fieldset>
    <legend>Quản lý mật khẩu TVV</legend>
     <asp:Panel ID="Panel1" runat="server" BackColor="#EBEBEB" 
                        BorderStyle="None" Height="33px" Width="100%">
                         <asp:ImageButton ID="ImgNew" runat="server" CausesValidation="False" 
                            Height="25px" ImageUrl="~/image/New File.png" OnClick="ImgNew_Click" 
                            ToolTip="Tạo mới" Width="25px" />
                        &nbsp;<asp:ImageButton ID="ImgSave" runat="server" Height="25px" 
                            ImageUrl="~/image/floppy disk.png" 
                             ToolTip="Cập nhật" Width="25px" onclick="ImgSave_Click" />
                        &nbsp;<asp:ImageButton ID="ImgFind" runat="server" Height="25px" 
                            ImageUrl="~/image/Find.png" CausesValidation="false" ToolTip="Tìm kiếm" 
                            Width="25px" onclick="ImgFind_Click" />
                    </asp:Panel>
   
    <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
            BackColor="#CCFFFF" Font-Names="Arial" ForeColor="#3366FF" Height="344px">
             <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Thông tin" TabIndex="0">
                <ContentTemplate>
    <div class="fm-req">
      <label for="txtMaTVV">Mã TVV:</label>
       <asp:TextBox ID="txtMaTVV" Width="80px" runat="server" AutoPostBack="true" CausesValidation="false" 
            ontextchanged="txtMaTVV_TextChanged"></asp:TextBox><asp:TextBox ID="txtHoTen" ReadOnly="true" BackColor="Yellow" runat="server"></asp:TextBox>
      </div>
      <div class="fm-req">
      <label for="txtTTPP">TTPP:</label>
      <asp:TextBox ID="txtTTPP" ReadOnly="true" BackColor="Yellow" runat="server"></asp:TextBox>
      </div>
      <div class="fm-req">
      <label for="txtOldPass">Mật khẩu cũ:</label>
      <asp:TextBox ID="txtOldPass" ReadOnly="true" BackColor="Yellow" runat="server"></asp:TextBox>
      </div>
       <div class="fm-req">
      <label for="txtNewPass">Mật khẩu mới:</label>
      <asp:TextBox ID="txtNewPass" TextMode="Password" runat="server"></asp:TextBox>
       <asp:RequiredFieldValidator ID="valRequireNewPassword" runat="server" ControlToValidate="txtNewPass" Display="None" ErrorMessage="Nhập mật khẩu mới"></asp:RequiredFieldValidator>
                         <cc1:ValidatorCalloutExtender TargetControlID="valRequireNewPassword" ID="ValidatorCalloutExtender2" runat="server" Enabled="True">
                        </cc1:ValidatorCalloutExtender>
      </div>
      <div class="fm-req">
      <label for="txtNewPassRetype">Nhập lại mật khẩu:</label>
       <asp:TextBox ID="txtNewPassRetype" TextMode="Password" runat="server"></asp:TextBox>
        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtNewPassRetype" ControlToCompare="txtNewPass" Display="None"  ErrorMessage="Mật khẩu không khớp" />
                        <cc1:ValidatorCalloutExtender TargetControlID="CompareValidator1" ID="ValidatorCalloutExtender3" runat="server" Enabled="True">
                        </cc1:ValidatorCalloutExtender>
      </div>
      </ContentTemplate>
      </cc1:TabPanel>
       <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Tìm kiếm" TabIndex="1">
                <ContentTemplate>
                <div class="fm-req">
                    <label for="txtInfo">Nhập thông tin:</label>
                         <asp:TextBox ID="txtInfo" AutoPostBack="true" CausesValidation="false" runat="server" ontextchanged="txtInfo_TextChanged"></asp:TextBox>
                         <asp:ImageButton ID="ISearch" runat="server" CausesValidation="False" 
                                    ImageUrl="~/image/Search.png" 
                                    style="width: 16px" onclick="ISearch_Click" />
                     </div>
                     <br />
                     <div align="center">
                     <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                                    AutoGenerateColumns="False" BackColor="#DEBA84" BorderColor="#DEBA84" 
                                    BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" 
                                    DataKeyNames="salesp_key" onpageindexchanging="GridView2_PageIndexChanging" 
                                    onrowcommand="GridView2_RowCommand" PageSize="5" Width="400px">
                                    <Columns>
                                        <asp:BoundField DataField="salesp_key" HeaderText="Mã TVV" />
                                        <asp:BoundField DataField="salesp_name" ItemStyle-Width="200px" HeaderText="Họ tên TVV" />
                                        <asp:BoundField DataField="sitename" ItemStyle-Width="200px" HeaderText="TTPP" />
                                        <asp:BoundField DataField="PW" HeaderText="Mật khẩu" />
                                        <asp:TemplateField>
                                            <ItemTemplate>
                                                <asp:Button ID="Button2" Width="50px" runat="server" CausesValidation="false" 
                                                    CommandName="chon" Text="Chọn" />
                                            </ItemTemplate>
                                            <FooterStyle BackColor="White" BorderColor="White" />
                                            <HeaderStyle BackColor="White" BorderColor="White" />
                                            <ItemStyle BackColor="White" BorderColor="White" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                                    <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                                    <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                                    <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                                </asp:GridView>
                                 </div>
                </ContentTemplate>
               
       </cc1:TabPanel>
      </cc1:TabContainer>
      </fieldset>
       <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
    </ContentTemplate>
</asp:UpdatePanel>
